package javabase.enum_learn;

/**
 * @Auther: luzhanshi
 * @Date: 2021/2/21 - 02 - 21 - 9:37 
 * @Description: javabase.enum_learn
 * @version: 1.0
 * 定义枚举类：季节
 */
public enum SeasonEnum {

    //提供枚举类有限的  确定的对象  【枚举类要求对象（常量）必须放在 最开始位置】
    SPRING("春天", "春暖花开"),
    SUMMER("夏天", "夏日炎炎"),
    AUTUMN("秋天", "金色大地"),
    WINTER("冬天", "冰天雪地");
    //定义属性
    private final String seasonName;//季节名称
    private final String seasonDesc;//季节描述

    //    利用私有构造器对属性进行赋值
    private SeasonEnum(String seasonName, String seasonDesc) {
        this.seasonName = seasonName;
        this.seasonDesc = seasonDesc;
    }


    public String getSeasonName() {
        return seasonName;
    }

    public String getSeasonDesc() {
        return seasonDesc;
    }

//    @Override
//    public String toString() {
//        return "Season{" +
//                "seasonName='" + seasonName + '\'' +
//                ", seasonDesc='" + seasonDesc + '\'' +
//                '}';
//    }
}
